package com.example.teesystem.common.websocket.model;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
public class UserInfo {
    /**
     * 用户 id
     */
    private Integer uid;
    
    /**
     * 课程 id
     */
    private Integer courseId;
    
    /**
     * 用户状态
     */
    private UserType type;
    
    /**
     * 用户信息更新时间
     */
    private LocalDateTime updateTime;
    
    /**
     * 会话 ID
     */
    private String sessionId;
    
    public UserInfo(Integer uid, Integer courseId, UserType type) {
        this.uid = uid;
        this.courseId = courseId;
        this.type = type;
        this.updateTime = LocalDateTime.now();
    }
}
